﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template/TicketManagement.Master" AutoEventWireup="true" CodeBehind="TicketEdit.aspx.cs" Inherits="TicketManagement.Ticket.TicketEdit" %>

<%@ Register src="../Template/uFooter.ascx" tagname="uFooter" tagprefix="uc1" %>
<%@ Register src="../Template/uHeader.ascx" tagname="uHeader" tagprefix="uc2" %>

<%@ Register src="../Template/uStaffMenu.ascx" tagname="uStaffMenu" tagprefix="uc3" %>
<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .home 
        {
            background-color: #FF6600 !important;
            color: #FFF !important;
        }
    </style>
    <script src="../Assets/Scripts/Validator.js" type="text/javascript"></script>
    <script src="../Assets/Scripts/tickets.js" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="wrapper relative">  
        <uc2:uHeader ID="uHeader1" runat="server" />
        <div class="clear"></div>
        <uc3:uStaffMenu ID="uStaffMenu1" runat="server" />
        <div class="clear10"></div>
        <div class="body">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr valign="top">
                        <td>    
                            <table border="0" cellpadding="1" cellspacing="1" id="box-quick" class="ftable fctable">
                                <tbody>
                                    <tr class="titlerow light">
                                        <td width="100">Mã số câu hỏi</td>
                                        <td>Dịch vụ</td>
                                        <td width="150">Trạng thái</td>
                                        <td width="120">Loại yêu cầu</td>
                                        <td width="120">Phòng xử lý</td>
                                        <td width="150">Nhân viên xử lý</td>
                                    </tr>
                                    <tr class="light">
                                        <td><label id="lblTicketNumber" runat="server"></label></td>
                                        <td><label id="lblService" runat="server"></label></td>
                                        <td><span style="color:#0099FF">
                                            <asp:DropDownList ID="cmbStatus" DataTextField="name" DataValueField="id" runat="server">
                                            </asp:DropDownList>
                                        </span></td>
                                        <td><label id="lblRequireType" runat="server"></label></td>
                                        <td><label id="lblDepartment" runat="server"></label></td>
                                        <td>
                                            <asp:DropDownList ID="cmbStaff" DataTextField="fullName" DataValueField="id" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <label id="lblMessage" runat="server"></label>       
                            <div class="clear10"></div>          
                        </td>
                        <td width="10"></td>
                    </tr>
                </tbody>
            </table>
        </div>  
        <div class="clear20">
            <asp:Button ID="btnSave" runat="server" Text="Lưu" CssClass="buttonnew" CausesValidation="false"
                onclick="btnSave_Click"/>
            <asp:Button ID="btnDeleteTicket" runat="server" Text="Xóa" CssClass="buttonnew"  CausesValidation="false"
                onclick="btnDeleteTicket_Click" OnClientClick="return confirmDelete();" />
        </div>
        <div class="clear20"></div>
        <div class="bodycontent">
            <div class="boxsup corner_81 relative">
                <div class="top"></div>
                <div class="heading">NỘI DUNG YÊU CẦU - <label id="lblSubject" runat="server"></label></div>
                <div class="middle">
                    <label id="lblContent" runat="server"></label>
                    <label id="lblAttachment" runat="server"></label>
                </div>
            </div> 
            <div class="break-sub clear10"></div>
   
            <asp:Repeater ID="rptComments" runat="server">
                <ItemTemplate>
                    <div class='boxsub <%# (Eval("ParentType").ToString() == "STAFFS") ? "yellow" : "" %>'>
                        <div class="heading"><%# Util.TicketUtil.getParentName(Convert.ToInt32(Eval("ParentId")), Eval("ParentType").ToString()) %> [<%# Eval("TimeStamp") %>] </div>
                        <div class="clear"></div>
                        <div class="middle"><%# Eval("Content") %>
                            <div class="attachment"><%# Util.TicketUtil.displayAttachment(Eval("Attachment1").ToString(), Eval("Attachment2").ToString(), Eval("Attachment3").ToString())%></div>
                        </div>
                    </div>
                    <div class="break-sub clear10"></div>
                </ItemTemplate>
            </asp:Repeater>
                                    
        </div>
        <div class="clear10"></div>
        <a id="downtoup" class="fr g-button g-button-white" style="display:none" href="javascript:void(0)">LÊN ĐẦU TRANG</a>
        <div class="boxsup corner_81">
            <div class="top"></div>
            <div>
                <div>
              	    <div class="clear5"></div> 
                  	<div class="relative bld">
                        Nội dung phản hồi:<br><br>
                        <ckeditor:ckeditorcontrol name="txtContent" id="txtContent"  runat="server" 
                            BasePath="~/Assets/js/ckeditor" 
                            ContentsCss="~/Assets/js/ckeditor/contents.css" 
                            TemplatesFiles="~/Assets/js/ckeditor/plugins/templates/templates/default.js" 
                            Toolbar="Basic" ToolbarStartupExpanded="False">
                        </ckeditor:ckeditorcontrol>                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" cssClass="color_khancap"
                            ControlToValidate="txtContent" 
                            ErrorMessage="Bạn vui lòng nhập nội dung thông tin"></asp:RequiredFieldValidator>
                  	</div>
                    <div class="clear10"></div>                  
               	  	<div class="bld">Hình minh họa 1(*.jpg, *.gif, *.png, &lt; 200 Kb) :<br>
                  	    <input class="box_input" type="file" name="pic" size="20" id="txtFile1" runat="server">
                        <asp:CustomValidator ID="CustomValidator5" runat="server" cssClass="color_khancap" ControlToValidate="txtFile1"
                        ErrorMessage="Tập tin không hợp lệ" ClientValidationFunction="imageValidator"></asp:CustomValidator>
                    </div>
                    <hr>                 
                	<div class="bld">Hình minh họa 2(*.jpg, *.gif, *.png, &lt; 200 Kb) :<br>
                        <input class="box_input" type="file" name="pic2" size="20" id="txtFile2" runat="server">
                        <asp:CustomValidator ID="CustomValidator1" runat="server" cssClass="color_khancap" ControlToValidate="txtFile2"
                        ErrorMessage="Tập tin không hợp lệ" ClientValidationFunction="imageValidator"></asp:CustomValidator>
                    </div>
                    <hr>                                 
                	<div class="bld">Hình minh họa 3(*.jpg, *.gif, *.png, &lt; 200 Kb) :<br>
                        <input class="box_input" type="file" name="pic3" size="20" id="txtFile3" runat="server">
                        <asp:CustomValidator ID="CustomValidator2" runat="server" cssClass="color_khancap" ControlToValidate="txtFile3"
                        ErrorMessage="Tập tin không hợp lệ" ClientValidationFunction="imageValidator"></asp:CustomValidator>
                    </div>                 
                    <div class="clear10"></div>                    
                    <asp:Button ID="btnAddComment" runat="server" cssClass="buttonnew" 
                        Text="Gửi Đi" onclick="btnAddComment_Click" />
      		    </div>
            </div>
        </div>    
        <div class="clear10"></div>  	       
    </div>
    <div class="clear" style="height:75px"></div> 
</asp:Content>
